package com.miguo.view.listener;

import android.view.View;
import android.view.View.OnClickListener;

public abstract class DoubleClickEvent implements OnClickListener {

    public abstract void doubleClick(View v);

    protected long time = 800;

    public DoubleClickEvent() {
    }

    public DoubleClickEvent(long times) {
        time = times;
    }

    public void onClick(View v) {
        if (CheckClick.isDoubleClick(time)) {
            doubleClick(v);
        }
    }
}